package com.rzjm.exercise.common.boot.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

@Component
public class ApplicationStartListener implements ApplicationListener<ContextRefreshedEvent>{
    
    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        /*logger.info("我的父容器为：" + contextRefreshedEvent.getApplicationContext().getParent());
        logger.info("初始化时我被调用了。");*/
        System.out.println("ApplicationStartListener");
    }
}